<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>上传文件</h1>
    <input type="file" class="upload_file">

    <button class="look">查看路径</button>

    <script>
        document.querySelector('.look').onclick = () => {
            const path = document.querySelector('.upload_file').value
            console.log('路径:', path)
        }
    </script>
</body>
</html>